# Maintainer: Brad Fanella <cesura@archlinux.org>
# Contributor: Martin Wimpress <code@flexion.org>

pkgname=mate-panel
pkgver=1.26.2
pkgrel=1
pkgdesc="The MATE Panel"
url="https://mate-desktop.org"
arch=('loong64' 'x86_64')
license=('GPL')
depends=('dbus-glib' 'libwnck3' 'libcanberra' 'libmateweather' 'libsm' 'mate-menus' 'mate-desktop' 'gettext' 'gtk-layer-shell')
makedepends=('itstool' 'gobject-introspection' 'mate-common' 'yelp-tools' 'autoconf-archive')
source=("https://pub.mate-desktop.org/releases/${pkgver%.*}/${pkgname}-${pkgver}.tar.xz")
groups=('mate')
conflicts=('mate-panel-gtk3')
replaces=('mate-panel-gtk3')
sha256sums=('aec4f98c89c59e76cc0656ed0482f1d82912f4decc660f21c8d004e493e05410')

build() {
    	cd "${pkgname}-${pkgver}" 
    	./configure \
        	--prefix=/usr \
        	--libexecdir=/usr/lib/${pkgname} \
        	--sysconfdir=/etc \
        	--localstatedir=/var \
        	--enable-introspection

    	#https://bugzilla.gnome.org/show_bug.cgi?id=656231
    	sed -i -e 's/ -shared / -Wl,-O1,--as-needed\0/g' libtool

    	make
}

package() {
    	cd "${pkgname}-${pkgver}"
    	make DESTDIR="${pkgdir}" install
}
